package com.mxpio.erp.common.order.policy;

/**
 * 根据策略执行单据
 *
 */
public abstract class AbstractOrderPolicy implements OrderPolicy {
	
	@Override
	public void apply(OrderContext context) {
		if(beforeExcute(context)) {
			// TODO 通用执行单据流程
			
			
			afterbeforeExcute(context);
		}
		
		
	}
	
	public abstract OrderContext config(OrderContext context);
	
	public boolean beforeExcute(OrderContext context) {
		return true;
	}

	public void afterbeforeExcute(OrderContext context) {

	}

}
